#!/usr/local/bin/perl5

sub max{
	my $max=shift @_;
	foreach my $num(@_)
	{	
	$max=$num if($max<$num);
	}
	return $max;
}
@nums=qw(1 2 3 27 42);
$result=&max(@nums);

print "@nums"."\n";
print $result;

print "The result [$result] is one of the input values (@nums)" if @nums ~~ $result;